package com.neoCalf.neoUser.service;


import com.neoCalf.neoCommon.entity.SysSetting;
import com.neoCalf.neoCommon.entity.UserInfo;
import com.neoCalf.neoCommon.model.dto.TokenUserInfoDto;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

public interface LoginService {
    /**
     * 注册
     *
     * @param userInfo
     * @param checkCode
     */
    void register(@NotNull UserInfo userInfo, @NotEmpty String checkCode);

    /**
     * 邮箱登录
     *
     * @param email
     * @param password
     * @return
     */
    TokenUserInfoDto login(String email, String password);

    /**
     * 手机登录
     *
     * @param phone
     * @param code
     * @return
     */
    TokenUserInfoDto phoneLogin(String phone, @NotEmpty String code);

    /**
     * 获取系统设置
     *
     * @return
     */
    SysSetting getSysSetting();

    /**
     * 忘记密码
     *
     * @param email
     * @param password
     * @param checkCode
     * @return
     */
    void forget(String email, String password, String checkCode);
}
